# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
FROM 172.20.0.31:880/library/findepi/graalvm:java17-native

RUN mkdir -p /ecare/logs \
    /ecare/temp \
    /ecare/skywalking/agent

WORKDIR /ecare

ENV SERVER_PORT=9905 DUBBO_PORT=20880  XXLJOB_PORT=9998 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""

EXPOSE ${SERVER_PORT}

EXPOSE ${DUBBO_PORT}

EXPOSE ${XXLJOB_PORT}

ADD ./target/yinfayun.jar ./yinfayun.jar

ENTRYPOINT java --add-opens java.base/java.lang=ALL-UNNAMED -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
           -XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
           -jar yinfayun.jar